import org.springframework.beans.factory.InitializingBean;

public class Student implements InitializingBean {
    private String name;
    private int age;
    private String certificate;
    private String birthDay;
    @Override
    public void afterPropertiesSet() throws Exception {
        this.birthDay = certificate.substring(6,10);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCertificate() {
        return certificate;
    }

    public void setCertificate(String certificate) {
        this.certificate = certificate;
    }

    public String getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(String birthDay) {
        this.birthDay = birthDay;
    }
}
